<%@ page language="java" contentType="text/html; charset=utf-8"
    pageEncoding="utf-8"%>
<%@ page import="java.util.*"%>
<%@ page import="BLL.*"%>
<%@ page import="java.io.PrintWriter"%>
<%@ page import="Model.*"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>用户验证</title>
</head>
<body>
<%	request.setCharacterEncoding("utf-8");
	String name=request.getParameter("userName");
	String pwd=request.getParameter("passWord");
	
	Cookie userName=new Cookie("userName", name );
	Cookie password=new Cookie("password", pwd );
	response.addCookie(userName);
	response.addCookie(password);
	
	if(new BLL.UserBLL().Login(name, pwd)){%>
		<jsp:forward page="index.jsp">
		<jsp:param value="amy" name="userName"/> 
		</jsp:forward>
	<%}else{%>
		<a href="login.html">账户或密码错误！！！点击返回</a>
	<%} %>
</body>
</html>